import request from '@/utils/request'

export function listDistributor(query) {
  return request({
    url: '/customer-distributor/page',
    method: 'get',
    params: query
  })
}

export function createDistributor(data) {
  return request({
    url: '/customer-distributor/add',
    method: 'post',
    data
  })
}

export function readDistributor(data) {
  return request({
    url: '/customer-distributor/info',
    method: 'get',
    data
  })
}

export function updateDistributor(data) {
  return request({
    url: '/customer-distributor/edit',
    method: 'post',
    data
  })
}

export function deleteDistributor(query) {
  return request({
    url: '/customer-distributor/remove',
    method: 'post',
    params:query
  })
}

export function setState(query) {
  return request({
    url: '/customer-distributor/updateStatus',
    method: 'post',
    params:query
  })
}
